<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <title>The AspectJTM Programming Guide</title><link rel="stylesheet" href="aspectj-docs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.44"><link rel="home" href="index.html" title="The AspectJTM Programming Guide"><link rel="next" href="preface.html" title="Preface"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The AspectJ<sup>TM</sup> Programming Guide</th></tr><tr><td width="20%" align="left">&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="preface.html">Next</a></td></tr></table><hr></div><div class="book" id="d0e1"><div class="titlepage"><div><h1 class="title"><a name="d0e1"></a>The AspectJ<sup>TM</sup> Programming Guide</h1></div><div><h3 class="author">the AspectJ Team</h3></div><div><div class="legalnotice"><p>
        Copyright (c) 1998-2001 Xerox Corporation, 
        2002-2003 Palo Alto Research Center, Incorporated.  
        All rights reserved.
      </p></div></div><div><div class="abstract"><p><a name="d0e15"></a><b>Abstract</b></p><p>
        This programming guide describes the AspectJ language. A
        companion guide describes the tools which are part of the
        AspectJ development environment.
      </p><p>
        If you are completely new to AspectJ, you should first read
        <a href="starting.html">Getting Started with AspectJ</a> for a broad overview of programming
        in AspectJ. If you are already familiar with AspectJ, but want a deeper
        understanding, you should read <a href="language.html">The AspectJ Language</a> and
        look at the examples in the chapter. If you want a more formal
        definition of AspectJ, you should read <a href="semantics.html">Semantics</a>.
      </p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="preface.html">Preface</a></dt><dt>1. <a href="starting.html">Getting Started with AspectJ</a></dt><dd><dl><dt><a href="starting.html#starting-intro">Introduction</a></dt><dt><a href="starting-aspectj.html">Introduction to AspectJ</a></dt><dd><dl><dt><a href="starting-aspectj.html#the-dynamic-join-point-model">The Dynamic Join Point Model</a></dt><dt><a href="starting-aspectj.html#pointcuts">Pointcuts</a></dt><dt><a href="starting-aspectj.html#advice">Advice</a></dt><dt><a href="starting-aspectj.html#inter-type-declarations">Inter-type declarations</a></dt><dt><a href="starting-aspectj.html#aspects">Aspects</a></dt></dl></dd><dt><a href="starting-development.html">Development Aspects</a></dt><dd><dl><dt><a href="starting-development.html#tracing">Tracing</a></dt><dt><a href="starting-development.html#profiling-and-logging">Profiling and Logging</a></dt><dt><a href="starting-development.html#pre-and-post-conditions">Pre- and Post-Conditions</a></dt><dt><a href="starting-development.html#contract-enforcement">Contract Enforcement</a></dt><dt><a href="starting-development.html#configuration-management">Configuration Management</a></dt></dl></dd><dt><a href="starting-production.html">Production Aspects</a></dt><dd><dl><dt><a href="starting-production.html#change-monitoring">Change Monitoring</a></dt><dt><a href="starting-production.html#context-passing">Context Passing</a></dt><dt><a href="starting-production.html#starting-production-consistentBehavior">Providing Consistent Behavior</a></dt></dl></dd><dt><a href="starting-conclusion.html">Conclusion</a></dt></dl></dd><dt>2. <a href="language.html">The AspectJ Language</a></dt><dd><dl><dt><a href="language.html#language-intro">Introduction</a></dt><dt><a href="language-anatomy.html">The Anatomy of an Aspect</a></dt><dd><dl><dt><a href="language-anatomy.html#an-example-aspect">An Example Aspect</a></dt><dt><a href="language-anatomy.html#pointcuts">Pointcuts</a></dt><dt><a href="language-anatomy.html#advice">Advice</a></dt></dl></dd><dt><a href="language-joinPoints.html">Join Points and Pointcuts</a></dt><dd><dl><dt><a href="language-joinPoints.html#some-example-pointcuts">Some Example Pointcuts</a></dt><dt><a href="language-joinPoints.html#call-vs-execution">call vs. execution</a></dt><dt><a href="language-joinPoints.html#pointcut-composition">Pointcut composition</a></dt><dt><a href="language-joinPoints.html#pointcut-parameters">Pointcut Parameters</a></dt><dt><a href="language-joinPoints.html#example">Example: <tt>HandleLiveness</tt></a></dt><dt><a href="language-joinPoints.html#pointcut-best-practice">Writing good pointcuts</a></dt></dl></dd><dt><a href="language-advice.html">Advice</a></dt><dt><a href="language-interType.html">Inter-type declarations</a></dt><dd><dl><dt><a href="language-interType.html#inter-type-scope">Inter-type Scope</a></dt><dt><a href="language-interType.html#example-pointassertions">Example: <tt>PointAssertions</tt></a></dt></dl></dd><dt><a href="language-thisJoinPoint.html">thisJoinPoint</a></dt></dl></dd><dt>3. <a href="examples.html">Examples</a></dt><dd><dl><dt><a href="examples.html#examples-intro">Introduction</a></dt><dt><a href="examples-howto.html">Obtaining, Compiling and Running the Examples</a></dt><dt><a href="examples-basic.html">Basic Techniques</a></dt><dd><dl><dt><a href="examples-basic.html#examples-joinPoints">Join Points and <tt>thisJoinPoint</tt></a></dt><dt><a href="examples-basic.html#examples-roles">Roles and Views</a></dt></dl></dd><dt><a href="examples-development.html">Development Aspects</a></dt><dd><dl><dt><a href="examples-development.html#tracing-using-aspects">Tracing using aspects</a></dt></dl></dd><dt><a href="examples-production.html">Production Aspects</a></dt><dd><dl><dt><a href="examples-production.html#a-bean-aspect">A Bean Aspect</a></dt><dt><a href="examples-production.html#the-subject-observer-protocol">The Subject/Observer Protocol</a></dt><dt><a href="examples-production.html#a-simple-telecom-simulation">A Simple Telecom Simulation</a></dt></dl></dd><dt><a href="examples-reusable.html">Reusable Aspects</a></dt><dd><dl><dt><a href="examples-reusable.html#tracing-using-aspects-revisited">Tracing using Aspects, Revisited</a></dt></dl></dd></dl></dd><dt>4. <a href="idioms.html">Idioms</a></dt><dd><dl><dt><a href="idioms.html#idioms-intro">Introduction</a></dt></dl></dd><dt>5. <a href="pitfalls.html">Pitfalls</a></dt><dd><dl><dt><a href="pitfalls.html#pitfalls-intro">Introduction</a></dt><dt><a href="pitfalls-infiniteLoops.html">Infinite loops</a></dt></dl></dd><dt>A. <a href="quick.html">AspectJ Quick Reference</a></dt><dd><dl><dt><a href="quick.html#quick-pointcuts">Pointcuts</a></dt><dt><a href="quick-typePatterns.html">Type Patterns</a></dt><dt><a href="quick-advice.html">Advice</a></dt><dt><a href="quick-interType.html">Inter-type member declarations</a></dt><dt><a href="quick-other.html">Other declarations</a></dt><dt><a href="quick-aspectAssociations.html">Aspects</a></dt></dl></dd><dt>B. <a href="semantics.html">Language Semantics</a></dt><dd><dl><dt><a href="semantics.html#semantics-intro">Introduction</a></dt><dt><a href="semantics-joinPoints.html">Join Points</a></dt><dt><a href="semantics-pointcuts.html">Pointcuts</a></dt><dd><dl><dt><a href="semantics-pointcuts.html#pointcut-definition">Pointcut definition</a></dt><dt><a href="semantics-pointcuts.html#context-exposure">Context exposure</a></dt><dt><a href="semantics-pointcuts.html#primitive-pointcuts">Primitive pointcuts</a></dt><dt><a href="semantics-pointcuts.html#signatures">Signatures</a></dt><dt><a href="semantics-pointcuts.html#matching">Matching</a></dt><dt><a href="semantics-pointcuts.html#type-patterns">Type patterns</a></dt><dt><a href="semantics-pointcuts.html#pattern-summary">Pattern Summary</a></dt></dl></dd><dt><a href="semantics-advice.html">Advice</a></dt><dd><dl><dt><a href="semantics-advice.html#advice-modifiers">Advice modifiers</a></dt><dt><a href="semantics-advice.html#advice-and-checked-exceptions">Advice and checked exceptions</a></dt><dt><a href="semantics-advice.html#advice-precedence">Advice precedence</a></dt><dt><a href="semantics-advice.html#reflective-access-to-the-join-point">Reflective access to the join point</a></dt></dl></dd><dt><a href="semantics-declare.html">Static crosscutting</a></dt><dd><dl><dt><a href="semantics-declare.html#inter-type-member-declarations">Inter-type member declarations</a></dt><dt><a href="semantics-declare.html#access-modifiers">Access modifiers</a></dt><dt><a href="semantics-declare.html#conflicts">Conflicts</a></dt><dt><a href="semantics-declare.html#extension-and-implementation">Extension and Implementation</a></dt><dt><a href="semantics-declare.html#interfaces-with-members">Interfaces with members</a></dt><dt><a href="semantics-declare.html#warnings-and-errors">Warnings and Errors</a></dt><dt><a href="semantics-declare.html#softened-exceptions">Softened exceptions</a></dt><dt><a href="semantics-declare.html#advice-precedence">Advice Precedence</a></dt><dt><a href="semantics-declare.html#statically-determinable-pointcuts">Statically determinable pointcuts</a></dt></dl></dd><dt><a href="semantics-aspects.html">Aspects</a></dt><dd><dl><dt><a href="semantics-aspects.html#aspect-declaration">Aspect Declaration</a></dt><dt><a href="semantics-aspects.html#aspect-extension">Aspect Extension</a></dt><dt><a href="semantics-aspects.html#aspect-instantiation">Aspect instantiation</a></dt><dt><a href="semantics-aspects.html#aspect-privilege">Aspect privilege</a></dt></dl></dd></dl></dd><dt>C. <a href="implementation.html">Implementation Notes</a></dt><dd><dl><dt><a href="implementation.html#d0e7271">Compiler Notes</a></dt><dt><a href="apcs02.html">Bytecode Notes</a></dt><dd><dl><dt><a href="apcs02.html#the-class-expression-and-string">The .class expression and String +</a></dt><dt><a href="apcs02.html#the-handler-join-point">The Handler join point</a></dt><dt><a href="apcs02.html#initializers-and-inter-type-constructors">Initializers and Inter-type Constructors</a></dt></dl></dd><dt><a href="apcs03.html">Annotation-style Notes</a></dt><dt><a href="apcs04.html">Summary of implementation requirements</a></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="preface.html">Next</a></td></tr><tr><td width="40%" align="left">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;Preface</td></tr></table></div></body></html>